package com.soccertgc.core.game.engine.events
{
	import com.soccertgc.core.game.engine.GameEngine;
	
	import flash.events.Event;

	public class GameEngineEvent extends Event
	{
		
		// -------------------------------------------------------------------------------
		// CONSTANTS
		// -------------------------------------------------------------------------------	
		
		// Events
		public static const         EVENT_GAME_ENGINE_START:String						= "gameEngineStart";
		public static const         EVENT_GAME_ENGINE_STOP:String						= "gameEngineStop";
		public static const         EVENT_GAME_ENGINE_PAUSE:String						= "gameEnginePause";
		public static const         EVENT_GAME_ENGINE_RESUME:String						= "gameEngineResume";
		public static const         EVENT_GAME_ENGINE_ERROR:String						= "gameEngineError";
		
		public static const         EVENT_GAME_ENGINE_MATCHMAKING_ERROR:String			= "gameEngineMatchmakingError";
		public static const         EVENT_GAME_ENGINE_MATCHMAKING_START:String			= "gameEngineMatchmakingStart";
		public static const         EVENT_GAME_ENGINE_MATCHMAKING_STOP:String			= "gameEngineMatchmakingTimeout";
		public static const         EVENT_GAME_ENGINE_MATCHMAKING_PROGRESS:String		= "gameEngineMatchmakingProgress";
		
		public static const         EVENT_GAME_ENGINE_PLAY_START:String					= "gameEnginePlayStart";
		public static const         EVENT_GAME_ENGINE_PLAY_STOP:String					= "gameEnginePlayStop";
		
		
		
		// -------------------------------------------------------------------------------
		// FIELDS
		// -------------------------------------------------------------------------------
		
		private var _engine:GameEngine;

		// -------------------------------------------------------------------------------
		// CONSTRUCTOR
		// -------------------------------------------------------------------------------
		
		public function GameEngineEvent(type:String, engine:GameEngine)
		{
			// ancestor constructor
			super(type); 
			// Initialization
			_engine = engine;
		}
		
		// -------------------------------------------------------------------------------
		// PROPERTIES
		// -------------------------------------------------------------------------------

		public function get engine():GameEngine
		{
			return _engine;
		}

	}
}